<?php
include_once "xAP-functions/webincludes.php";

$sql="select ChannelID,ChannelAlias from xAP_TV_Channel order by ChannelOrder,ChannelAlias";
$results=dbquery($sql);


foreach($results as $value){
	$chk="";
	if(is_array($extradata["ch"])){
		if (in_array($value["ChannelID"],$extradata["ch"])){
			$chk=" CHECKED";
		}
	}
	$body.="<input type='checkbox' name='ch[]' value='".$value["ChannelID"]."'".$chk.">".$value["ChannelAlias"]."<BR>";
}


echo LayoutWidgetConfig("Select Source",$body,$widgetid);
?>